<template>
    <div>
        <!-- 分享面板组件 -->
        <van-share-sheet  v-model="showShare" title="立即分享给好友" :options="options" @select="onSelect"  @click-overlay='overlayFn()'/>
    </div>
</template>

<script>

export default {
    name: '',
    data() {
        return {
            showShare:false,
            options: [
                [
                    { name: '微信', icon: 'wechat' },
                    { name: '朋友圈', icon: 'wechat-moments' },
                    { name: '微博', icon: 'weibo' },
                    { name: 'QQ', icon: 'qq' },
                ],
                [
                    { name: '复制链接', icon: 'link' },
                    { name: '分享海报', icon: 'poster' },
                    { name: '二维码', icon: 'qrcode' },
                    { name: '小程序码', icon: 'weapp-qrcode' },
                ],
            ],
        };
    },
    // props: ['showShare','changeshow'],

    methods: {
        onSelect(option) {
            // Toast(option.name);
            // this.showShare = false;
            // this.changeshow
            // console.log(this);
            // this.$parent.changeshow()
        },
        // overlayFn(){
        //     console.log(this);
        //     this.$parent.showShare = false
        //     return 
        // }
        overlayFn(){
            this.showShare = false
            // this.$emit('transfer',showShare)
        }

    },
}

</script>
<style scoped>

</style>